package info.wangyuan.agent.entity.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import info.wangyuan.agent.valid.ValidName;
import lombok.*;

import java.io.Serial;
import java.io.Serializable;

/**
 * 文件类
 *
 * @author Albert
 * @since 2025-07-15 21:41:07
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName(value = "tb_file_info", autoResultMap = true)
public class FileInfo extends BaseEntity implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 文件名称
     */
    @ValidName
    private String name;

    /**
     * 文件大小
     */
    private Long size;

    /**
     * 文件后缀名
     */
    private String suffix;

    /**
     * 文件路径
     */
    private String path;

    /**
     * 知识库ID
     */
    private Integer knowledgeBaseId;

    /**
     * 文件页数
     */
    private Integer pageSize;
}
